home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Information / CSMP Digest / volume 2 / csmp-v2-007.txt < prev    next >
Text File  |  1995-06-30  |  55KB  |  1,474 lines

  1. C.S.M.P. Digest             Sat, 30 Jan 93       Volume 2 : Issue 7
  2.  
  3. Today's Topics:
  4.  
  5.     Problem with patch to HFSDispatch
  6.     How do I find a hole in the DeskTop?!
  7.     Volume icons?
  8.     Suppl. Gestalt Selectors List 1.2
  9.  
  10.  
  11.  
  12. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  13.  
  14. The digest is a collection of article threads from the internet newsgroup
  15. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  16. regularly and want an archive of the discussions.  If you don't know what a
  17. newsgroup is, you probably don't have access to it.  Ask your systems
  18. administrator(s) for details.  If you don't have access to news, there is
  19. no way that I know of for you to post articles to the group.
  20.  
  21. Each issue of the digest contains one or more sets of articles (called
  22. threads), with each set corresponding to a 'discussion' of a particular
  23. subject.  The articles are not edited; all articles included in this digest
  24. are in their original posted form (as received by our news server at
  25. cs.uoregon.edu).  Article threads are not added to the digest until the last
  26. article added to the thread is at least one month old (this is to ensure that
  27. the thread is dead before adding it to the digest).  Article threads that
  28. consist of only one message are generally not included in the digest.
  29.  
  30. The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
  31. [128.223.8.8] in the directory /pub/mac/csmp-digest.  Be sure to read the
  32. file /pub/mac/csmp-digest/README before downloading any files.  The most
  33. recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the
  34. directory /info-mac/digest/csmp.  If you don't have ftp capability, the sumex
  35. archive has a mail server; send a message with the text '$MACarch help' (no
  36. quotes) to LISTSERV@ricevm1.rice.edu for more information.
  37.  
  38. The digest is also available via email.  Just send a note saying that you
  39. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  40. automatically receive each new issue as it is created.  Sorry, back issues
  41. are not available through the mailing list.
  42.  
  43. Send administrative mail to mkelly@cs.uoregon.edu.
  44.  
  45.  
  46. -------------------------------------------------------
  47.  
  48. From: rmah@panix.com (Robert Mah)
  49. Subject: Problem with patch to HFSDispatch
  50. Date: 22 Dec 92 18:27:10 GMT
  51. Organization: PANIX Public Access Unix, NYC
  52.  
  53. In an extension that works fine on most systems, but some people seem to 
  54. be getting freezes when they shut down/restart their machine.  I'm not 
  55. sure, but I think it might be related to my patching HFSDispatch.
  56.  
  57. I'm using register a1 to hold the adress of the real trap -- is there
  58. something wrong with this?  Anyone care to comment?
  59.  
  60. Some code...
  61.  
  62. /* 
  63.  *  We need to trap whenever the user moves a directory (selector 5).
  64.  */
  65. pascal void FSDispatchPatch()
  66. {
  67.     asm{
  68.         movem.l  a4, -(sp)                 ; save registers
  69.         lea      main, a4                  ; setup globals
  70.         cmp.w    #5, d0                    ; if not CatMove
  71.         bne.s    @1 
  72.         move.w   #1, gNeedsUpdate          ; set the gNeedsUpdate flag
  73. @1      move.l   realHFSDispatchTrap, a1   ; grab the addr of the real thing
  74.         movem.l  (sp)+, a4                 ; restore registers
  75.         jmp      (a1)                      ; jump to real HFSDispatch
  76.     }
  77. }
  78.  
  79. Happy Holdiays,
  80. Rob
  81. - -- 
  82. [--------------------------------------------------]
  83. [  Robert S. Mah   |  "Every day an adventure,     ]
  84. [  rmah@panix.com  |   every moment a challenge."  ]
  85. [--------------------------------------------------]
  86.  
  87. +++++++++++++++++++++++++++
  88.  
  89. From: leonardr@netcom.com (Leonard Rosenthol)
  90. Date: 23 Dec 92 00:30:46 GMT
  91. Organization: Netcom Online Communications Services (408-241-9760 login: guest)
  92.  
  93. In article <1992Dec22.182710.26751@panix.com> rmah@panix.com (Robert Mah) writes:
  94. >In an extension that works fine on most systems, but some people seem to 
  95. >be getting freezes when they shut down/restart their machine.  I'm not 
  96. >sure, but I think it might be related to my patching HFSDispatch.
  97. >
  98. >I'm using register a1 to hold the adress of the real trap -- is there
  99. >something wrong with this?  Anyone care to comment?
  100. >
  101.     Yup, that's your problem.  A1 & A2 are "special" for the HFSDispatch
  102. routine and "may" contain useful information.  Using A3 should work just
  103. fine.
  104.  
  105. - -- 
  106. - -----------------------------------------------------------------------------
  107. Leonard Rosenthol            Internet:     leonardr@netcom.com
  108. Director of Advanced Technology        AppleLink:    MACgician
  109. Aladdin Systems, Inc.            GEnie:        MACgician
  110.  
  111. +++++++++++++++++++++++++++
  112.  
  113. From: absurd@apple.apple.com (Tim Dierks, software saboteur)
  114. Date: 23 Dec 92 03:10:35 GMT
  115. Organization: MacDTS Marauders
  116.  
  117. In article <1992Dec22.182710.26751@panix.com>, rmah@panix.com (Robert Mah)
  118. wrote:
  119. > In an extension that works fine on most systems, but some people seem to 
  120. > be getting freezes when they shut down/restart their machine.  I'm not 
  121. > sure, but I think it might be related to my patching HFSDispatch.
  122. > I'm using register a1 to hold the adress of the real trap -- is there
  123. > something wrong with this?  Anyone care to comment?
  124. > Some code...
  125. > /* 
  126. >  *  We need to trap whenever the user moves a directory (selector 5).
  127. >  */
  128. > pascal void FSDispatchPatch()
  129. > {
  130. >     asm{
  131. >         movem.l  a4, -(sp)                 ; save registers
  132. >         lea      main, a4                  ; setup globals
  133. >         cmp.w    #5, d0                    ; if not CatMove
  134. >         bne.s    @1 
  135. >         move.w   #1, gNeedsUpdate          ; set the gNeedsUpdate flag
  136. > @1      move.l   realHFSDispatchTrap, a1   ; grab the addr of the real thing
  137. >         movem.l  (sp)+, a4                 ; restore registers
  138. >         jmp      (a1)                      ; jump to real HFSDispatch
  139. >     }
  140. > }
  141.  
  142. Your problem is that you're destroying A1; it's used as a parameter by
  143. some HFSDispatch selectors.
  144.  
  145. While you could do this by trashing a different register, which isn't
  146. used, you could always use the slightly more complex but somewhat more
  147. clever method.
  148.  
  149.           clr.l    -(sp)                     ; save room for forwarding
  150. address   
  151. >         movem.l  a4, -(sp)                 ; save registers
  152. >         lea      main, a4                  ; setup globals
  153. >         cmp.w    #5, d0                    ; if not CatMove
  154. >         bne.s    @1 
  155. >         move.w   #1, gNeedsUpdate          ; set the gNeedsUpdate flag
  156.   @1      move.l   realHFSDispatchTrap,4(a7) ; store forwarding address on
  157. stack
  158. >         movem.l  (sp)+, a4                 ; restore registers
  159.           rts                                ; jump to real HFSDispatch
  160.  
  161. Note that this preserves all the registers by using the trick of using
  162. an RTS to pop the jump address off of the stack, allowing you to restore
  163. all your registers first.
  164.  
  165. (Well, I always thought it was neat, anyway.)
  166.  
  167. Have a great holiday, one and all- I'm off to home till Jan 6; I'll
  168. be gone (netwise) till then.
  169.  
  170. Tim Dierks
  171. MacDTS pinball addict
  172.  
  173. +++++++++++++++++++++++++++
  174.  
  175. From: d88-jwa@hemul.nada.kth.se (Jon Wtte)
  176. Date: 23 Dec 92 11:05:45 GMT
  177. Organization: Royal Institute of Technology, Stockholm, Sweden
  178.  
  179. In <1992Dec22.182710.26751@panix.com> rmah@panix.com (Robert Mah) writes:
  180.  
  181. >I'm using register a1 to hold the adress of the real trap -- is there
  182. >something wrong with this?  Anyone care to comment?
  183.  
  184. >@1      move.l   realHFSDispatchTrap, a1   ; grab the addr of the real thing
  185. >        movem.l  (sp)+, a4                 ; restore registers
  186. >        jmp      (a1)                      ; jump to real HFSDispatch
  187.  
  188. Yes, this trashes register a1.
  189.  
  190. Instead, you should "reserve space" on the stack for the
  191. chain address, save the registers, do your thing, put
  192. the registers back into shape and RTS _to_the_next_routine_.
  193.  
  194. Something like:
  195.  
  196.     subq #4, a7
  197.     movem.l    a1/a4, -(a7)
  198.     ...
  199.     do stuff
  200.     ...
  201.     move.l realHFSDispatchTrap, a1
  202.     move.l a1, 8(a7)
  203.     movem.l (a7)+, a1/a4
  204.     rts
  205.  
  206. Note that this _IS_ a head patch, since the "RTS" actually
  207. is used as a jump to the next function, leaving stack and
  208. registers intact.
  209.  
  210. Cheers,
  211.  
  212.                         / h+
  213.  
  214. - -- 
  215.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  216.   "It was, in fact, cool as all get-out.  Fortunately it was a little
  217.    too late (historically speaking) to be groovy."
  218.                      -- Dennis Pelton
  219.  
  220. +++++++++++++++++++++++++++
  221.  
  222. From: rmah@panix.com (Robert Mah)
  223. Date: 28 Dec 92 02:25:59 GMT
  224. Organization: PANIX Public Access Unix, NYC
  225.  
  226. In <absurd-221292190600@seuss.apple.com> absurd@apple.apple.com (Tim Dierks, software saboteur) writes:
  227.  
  228. >Your problem is that you're destroying A1; it's used as a parameter by
  229. >some HFSDispatch selectors.
  230.  
  231. >While you could do this by trashing a different register, which isn't
  232. >used, you could always use the slightly more complex but somewhat more
  233. >clever method.
  234.  
  235. >       clr.l    -(sp)                     ; save room for forwarding address
  236. >>      movem.l  a4, -(sp)                 ; save registers
  237. >>      lea      main, a4                  ; setup globals
  238. >>      cmp.w    #5, d0                    ; if not CatMove
  239. >>      bne.s    @1 
  240. >>      move.w   #1, gNeedsUpdate          ; set the gNeedsUpdate flag
  241. >> @1   move.l   realHFSDispatchTrap,4(a7) ; store forwarding address on stack
  242. >>      movem.l  (sp)+, a4                 ; restore registers
  243. >       rts                                ; jump to real HFSDispatch
  244.  
  245. >Note that this preserves all the registers by using the trick of using
  246. >an RTS to pop the jump address off of the stack, allowing you to restore
  247. >all your registers first.
  248.  
  249. Thanks I'll try it and see how it works.  But won't changing the return 
  250. address mess up some toolbox things.  I seem to recall that that was why
  251. "tail patches" were not allowed -- of course, I could be totally confused
  252. here :->
  253.  
  254. Thanks again,
  255. Rob
  256. - -- 
  257. [--------------------------------------------------]
  258. [  Robert S. Mah   |  "Every day an adventure,     ]
  259. [  rmah@panix.com  |   every moment a challenge."  ]
  260. [--------------------------------------------------]
  261.  
  262. +++++++++++++++++++++++++++
  263.  
  264. From: rmah@panix.com (Robert Mah)
  265. Date: 28 Dec 92 02:28:01 GMT
  266. Organization: PANIX Public Access Unix, NYC
  267.  
  268. Jon,
  269.  
  270. Thanks a bunch.  Also clears up a question I had regarding return addresses
  271. that I asked Tim Dierks about in his reply.
  272.  
  273. Cool runnin'
  274. Rob
  275.  
  276. - -- 
  277. [--------------------------------------------------]
  278. [  Robert S. Mah   |  "Every day an adventure,     ]
  279. [  rmah@panix.com  |   every moment a challenge."  ]
  280. [--------------------------------------------------]
  281.  
  282. +++++++++++++++++++++++++++
  283.  
  284. From: d88-jwa@dront.nada.kth.se (Jon Wtte)
  285. Date: 28 Dec 92 10:41:04 GMT
  286. Organization: Royal Institute of Technology, Stockholm, Sweden
  287.  
  288. In <1992Dec28.022559.2496@panix.com> rmah@panix.com (Robert Mah) writes:
  289.  
  290. >Thanks I'll try it and see how it works.  But won't changing the return 
  291. >address mess up some toolbox things.  I seem to recall that that was why
  292. >"tail patches" were not allowed -- of course, I could be totally confused
  293. >here :->
  294.  
  295. But that's the beauty of it; we DON'T change the normal return
  296. address. The stack will look a little like:
  297.  
  298.     <Junk>
  299.     Return Address
  300.     <Saved Space>
  301.     <Saved registers>
  302.  
  303. Then we push the address to chain to:
  304.  
  305.     <Junk>
  306.     Return Address
  307.     Chain Address
  308.     <Saved registers>
  309.  
  310. and restore registers and do an RTS:
  311.  
  312.     <Junk>
  313.     Return Address
  314.  
  315. The stack looks JUST like it did on entry to our routine!
  316. The patch has preserved all registers and the original return
  317. address, so it isn't a tail patch and it isn't zapping any
  318. registers; it's clean.
  319.  
  320.  
  321. - -- 
  322.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  323.  
  324.   "From now on I will re-label the EQ on the deck as Fizz and Wobble
  325.    instead of HF and LF."
  326.  
  327. ---------------------------
  328.  
  329. From: yjc@po.cwru.edu (Jerome 'TofuSoft' Chan)
  330. Subject: How do I find a hole in the DeskTop?!
  331. Date: 25 Dec 1992 06:29:04 GMT
  332. Organization: The Tofu Society of Singapore
  333.  
  334. How do I find a clear section of the desktop which is NOT covered by
  335. Windows?! I've want my clock application window to slowly creep to the
  336. nearest uncovered region on the desktop.
  337.  
  338. - ---
  339. The Evil Tofu
  340.  
  341. +++++++++++++++++++++++++++
  342.  
  343. From: grobbins@Apple.COM (Grobbins)
  344. Date: 27 Dec 92 01:02:48 GMT
  345. Organization: Apple Computer Inc, Cupertino, CA
  346.  
  347. In article <yjc-251292012254@yjc-slip.dialin.cwru.edu> yjc@po.cwru.edu (Jerome 'TofuSoft' Chan) writes:
  348. >How do I find a clear section of the desktop which is NOT covered by
  349. >Windows?! I've want my clock application window to slowly creep to the
  350. >nearest uncovered region on the desktop.
  351.  
  352. Hmm.  Well, one way would be to make certain that your application is
  353. the backmost and open a window which covers the whole desktop (the same
  354. size as the gray rgn bounding box.) Then the visRgn of that window
  355. would be all of the desktop area minus all of the open windows of all
  356. applications.
  357.  
  358. Making your application the backmost would be a small pain, and opening
  359. a window which covers the whole screen would make an ugly flash, so
  360. that's not a good solution.  Besides, you would either have to keep the
  361. window open and visible or else reopen it periodically to keep monitoring
  362. its visRgn.
  363.  
  364. A more promising solution is to use the visRgn of the System 7 Finder's
  365. Desktop window, since that region also reflects the whole screen minus
  366. any open windows (including your app's open window).  There's no documented
  367. way to get the WindowPtr to the Desktop window, however, though doing
  368. something like patching OpenWindow or GetNewWindow at INIT time would
  369. probably work.  The window is named Desktop, though there is no
  370. guarantee that the Finder window list won't have other windows
  371. coincidentally named Desktop, so checking its bounds against the the
  372. real desktop (grayrgn) bounds is probably a good idea to makesure you've
  373. gotten the right window.
  374.  
  375. Good luck.
  376.  
  377. Grobbins       grobbins@apple.com
  378.  
  379. +++++++++++++++++++++++++++
  380.  
  381. From: rmah@panix.com (Robert Mah)
  382. Date: 28 Dec 92 02:40:44 GMT
  383. Organization: PANIX Public Access Unix, NYC
  384.  
  385. In <yjc-251292012254@yjc-slip.dialin.cwru.edu> yjc@po.cwru.edu (Jerome 'TofuSoft' Chan) writes:
  386.  
  387. >How do I find a clear section of the desktop which is NOT covered by
  388. >Windows?! I've want my clock application window to slowly creep to the
  389. >nearest uncovered region on the desktop.
  390.  
  391. GREAT IDEA.  I'm gonna use it too, if you don't mind.
  392.  
  393. Anyway, you just gotta look at the structure regions of all the windows that
  394. are visible.  Each application keeps a list of windows starting at the global
  395. WindowList.  The only problem is to get WindowList for each application.  
  396. One possible way is to patch InitWindows and grab that app's WindowList
  397. global.  Don't forget to patch ExitToShell to catch the application's quitting.
  398.  
  399. Another option is to track all window creation, deletion, hiding and showing.
  400.  
  401. On second thought, does GrayRgn hold the VISIBLE desktop or the whole thing?
  402. Not sure on this...but a little experimentation should clear it up.
  403.  
  404. Cheers,
  405. Rob
  406.  
  407.  
  408.  
  409. - -- 
  410. [--------------------------------------------------]
  411. [  Robert S. Mah   |  "Every day an adventure,     ]
  412. [  rmah@panix.com  |   every moment a challenge."  ]
  413. [--------------------------------------------------]
  414.  
  415. +++++++++++++++++++++++++++
  416.  
  417. From: phaedrus@halcyon.com (Mark Phaedrus)
  418. Date: 28 Dec 92 05:26:51 GMT
  419. Organization: The 23:00 News and Mail Service
  420.  
  421. In article <1992Dec28.024044.3652@panix.com> rmah@panix.com (Robert Mah) writes:
  422. >In <yjc-251292012254@yjc-slip.dialin.cwru.edu> yjc@po.cwru.edu (Jerome 'TofuSoft' Chan) writes:
  423. >>How do I find a clear section of the desktop which is NOT covered by
  424. >>Windows?! I've want my clock application window to slowly creep to the
  425. >>nearest uncovered region on the desktop.
  426. >GREAT IDEA.  I'm gonna use it too, if you don't mind.
  427.  
  428.      I'm not sure that this is such a good idea.  The user is always supposed
  429. to be in control of the Mac interface.  When I put a window somewhere on my
  430. screen, it means that I've decided that that's a perfectly fine place for that
  431. window, and I would just assume it didn't try to crawl somewhere else on its
  432. own, thank you very much. :)
  433.      If you do decide to do this, be sure to make it user-configurable.  And
  434. while you're making it user-configurable, add the option to make the window
  435. just teleport to a clear location, rather than "creeping" there.  Even if I
  436. wanted this feature, I'm not sure that I'd want a background application
  437. like a clock using up the CPU time required to slowly move its window across
  438. the screen.
  439. - -- 
  440. \o\ Internet: phaedrus@halcyon.com  (Seattle, WA Public Access Unix)     \o\
  441.  \o\ "How'd you like to move a few steps down the food chain, pal?"       \o\
  442.   \o\ If you enjoy fantasy/SF stories with transformation themes, email me \o\
  443.    \o\ for a copy of the Transformation Stories List.                       \o\
  444.  
  445. +++++++++++++++++++++++++++
  446.  
  447. From: yjc@po.cwru.edu (Jerome 'TofuSoft' Chan)
  448. Date: 28 Dec 92 19:19:03 GMT
  449. Organization: The Tofu Society of Singapore
  450.  
  451. In article <1992Dec28.024044.3652@panix.com>, rmah@panix.com (Robert Mah)
  452. wrote:
  453.  
  454. > GREAT IDEA.  I'm gonna use it too, if you don't mind.
  455.  
  456.  
  457. Please go ahead and use it.
  458.  
  459. Maybe someone could put up a window behind such a hole and do neat little
  460. animations, like maybe a cartoon of the talking moose playing chess with
  461. the dogcow. :)
  462.  
  463. - ---
  464. The Evil Tofu
  465.  
  466. ---------------------------
  467.  
  468. From: UC525655@mizzou1.missouri.edu (Mark Eaton)
  469. Subject: Volume icons?
  470. Date: 20 Dec 92 22:41:12 GMT
  471. Organization: University of Missouri
  472.  
  473. Hi all-
  474. Where can i find the icon definition for a mounted volume?
  475. I have looked through all the (I think) relevant material in
  476. IM I-VI, but obviously I've missed something somewhere, but all
  477. IM talks about are file icons. Help!
  478.  
  479.  
  480. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  481. Mark Eaton                    | Opinions? We're not allowed to have
  482. UC525655@MIZZOU1.MISSOURI.EDU | opinions at Mizzou... get back to me
  483.                               | in '94 when I graduate... ;)
  484.  
  485. +++++++++++++++++++++++++++
  486.  
  487. From: jacman@magicbb.uucp (Jordan Christensen)
  488. Date: 22 Dec 92 12:32:28 GMT
  489. Organization: MAGIC - Macintosh Awareness Group In Canada
  490.  
  491. >Hi all-
  492. >Where can i find the icon definition for a mounted volume?
  493. >I have looked through all the (I think) relevant material in
  494. >IM I-VI, but obviously I've missed something somewhere, but all
  495. >IM talks about are file icons. Help!
  496.  
  497. The volume icons are stored in an invisible file called 'Icon' in the root
  498. directory, it's id is (not sure of this) '-16455'.
  499.  
  500. Hoped This Helped
  501.  
  502. +++++++++++++++++++++++++++
  503.  
  504. From: dmitry@chemistry.chem.utah.edu (Dmitry Boldyrev)
  505. Date: 29 Dec 92 18:39:56 GMT
  506. Organization: University of Utah
  507.  
  508. >Hi all-
  509. >Where can i find the icon definition for a mounted volume?
  510. >I have looked through all the (I think) relevant material in
  511. >IM I-VI, but obviously I've missed something somewhere, but all
  512. >IM talks about are file icons. Help!
  513. >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  514. >Mark Eaton                    | Opinions? We're not allowed to have
  515. >UC525655@MIZZOU1.MISSOURI.EDU | opinions at Mizzou... get back to me
  516. >                              | in '94 when I graduate... ;)
  517.  
  518. Hello Mark,
  519. Here, I have smth for you...
  520. ============================ CUT HERE ============================
  521.  
  522. /*    this is the data structure pointed to in the result of the
  523.     disk driver call csCode=21 (get ICN#/comment).  This call
  524.     works on all devices.
  525. */
  526.  
  527. typedef struct TInfoBlk {
  528.     unsigned char    icon[128];        /* icon */
  529.     unsigned char    mask[128];        /* mask */
  530.     Str255            infoString;        /* info string (for get info) */
  531. } TInfoBlk,*TInfoPtr;
  532.  
  533. void GetDiskInfo(short driverRefNum,short driveNum,TInfoPtr *dataBlk);
  534. void DrawInfo(TInfoPtr infoBlock);
  535. void GetAllInfo(void);
  536. void GetAllInfoYourWay(void);
  537.  
  538.  
  539. void main(void)
  540. {
  541.     WindowPtr theWindow;
  542.     Rect wBounds;
  543.  
  544. #ifdef THINK_C
  545.     InitGraf(&thePort);
  546. #else
  547.     InitGraf(&qd.thePort);
  548. #endif
  549.     InitFonts();
  550.     InitWindows();
  551.     InitMenus();
  552.     TEInit();
  553.     InitDialogs(nil);
  554.     FlushEvents(everyEvent,0);
  555.     InitCursor();
  556.     
  557.     SetRect(&wBounds,40,40,100,100);
  558.     theWindow = NewWindow
  559. (nil,&wBounds,(StringPtr)"\pIcons",true,documentProc,
  560.                 (WindowPtr)(-1),true,0L);
  561.     SetPort(theWindow);
  562.     GetAllInfo();
  563.     DisposeWindow(theWindow);
  564. }
  565.  
  566.  
  567. /*    This routine traverses the currently mounted volumes
  568.     index using PBHGetVInfo().  The drive # and device
  569.     driver number for each volume is extracted from the
  570.     parameter block, and passed into GetDiskInfo() to
  571.     call the disk drivers.
  572.     
  573.     Once the data has been retrieved, the icon is plotted
  574. */
  575.  
  576. void GetAllInfo(void)
  577. {
  578.     HParamBlockRec vBlock;    /* volume parameter block used to traverse
  579. mounted vols */
  580.     OSErr err;
  581.     TInfoPtr dataBlk;        /* pointer used to point to result of csCode=21 call
  582. */
  583.     
  584.     vBlock.volumeParam.ioNamePtr = nil;
  585.     vBlock.volumeParam.ioVRefNum = 0;
  586.     vBlock.volumeParam.ioVolIndex = 1;
  587.     
  588.     do {
  589.         err = PBHGetVInfo (&vBlock,false);
  590.         vBlock.volumeParam.ioVolIndex++;
  591.         if (err==noErr) {
  592.             GetDiskInfo(vBlock.volumeParam.ioVDRefNum,
  593.                         vBlock.volumeParam.ioVDrvInfo,&dataBlk);
  594.             if (dataBlk)
  595.                 DrawInfo(dataBlk);
  596.         }
  597.     } while (err==noErr);
  598. }
  599.  
  600.  
  601. /*    GetDiskInfo() makes the call to the volume's driver to get the
  602.     volume icon and info string.  A pointer to this data is returned
  603.     by reference in dataBlk
  604.     
  605.     This routine tries to call the disk's driver with csCode=22,
  606.     which attempts to get info on a specific physical volume.
  607.     
  608.     If the csCode=22 call fails, I call csCode=21 to get the generalized
  609.     media icon.
  610.     
  611.     Both calls are documented in IM V-470
  612. */
  613.  
  614. void GetDiskInfo(short driverRefNum,short driveNum,TInfoPtr *dataBlk)
  615. {
  616.     CntrlParam pBlock;
  617.     OSErr err;
  618.     
  619.     pBlock.ioVRefNum = driveNum;
  620.     pBlock.ioCRefNum = driverRefNum;
  621.     pBlock.csCode = 22;
  622.     
  623.     err = PBControl(&pBlock,false);
  624.     if (err==controlErr) {
  625.         pBlock.ioVRefNum = driveNum;
  626.         pBlock.ioCRefNum = driverRefNum;
  627.         pBlock.csCode = 21;
  628.         err = PBControl(&pBlock,false);
  629.     }
  630.     
  631.     if (err==noErr)
  632.         *dataBlk = (TInfoPtr) *(Ptr *)pBlock.csParam; /* messy way to get the
  633. locn out */
  634.     else *dataBlk = nil;
  635. }
  636.  
  637.  
  638.  
  639. /*    this routine uses CopyBits to draw the icon on the screen (ignoring
  640. the mask and
  641.     the info string).  Make sure you put up a window and call SetPort()
  642. first!
  643. */
  644.  
  645. void DrawInfo(TInfoPtr infoBlock)
  646. {
  647.     BitMap iconMap;
  648.     Rect destRect;
  649.     
  650.     iconMap.baseAddr = (Ptr)infoBlock;
  651.     iconMap.rowBytes = 4;
  652.     SetRect(&iconMap.bounds,0,0,32,32);
  653.     SetRect(&destRect,0,0,32,32);
  654.     OffsetRect(&destRect,10,10);
  655.     CopyBits(&iconMap,&thePort->portBits,&iconMap.bounds,&destRect,
  656.             srcCopy,nil);
  657.     while (!Button());
  658.     while (Button());
  659. }
  660. ============================ CUT HERE ============================
  661.  
  662. Guess, it make sense..
  663. .................................................
  664. Dmitry Boldyrev,
  665. Department of Chemistry, University of Utah.
  666. Internet: dmitry@chemistry.chem.utah.edu
  667.           
  668.                -- "I only know that I know nothing"
  669.                                       - Socrates
  670.  
  671. ---------------------------
  672.  
  673. From: rgaros@bio.vu.nl (Rene G.A. Ros)
  674. Subject: Suppl. Gestalt Selectors List 1.2
  675. Organization: VU Biology, Amsterdam, The Netherlands
  676. Date: Tue, 1 Dec 1992 12:10:58 GMT
  677.  
  678. Archive-name: gestalt-list
  679. Last Modified: 1992/11/30
  680. Version: 1.2
  681.  
  682.  
  683.  
  684. Supplemental Gestalt Selectors List 1.2
  685. =======================================
  686.  
  687. Last modified: November 30, 1992, 21:50 CET (GMT+1)
  688.  
  689. Supplemental to the selector codes listed in the Gestalt Chapter of
  690. Inside Macintosh VI (IM VI), that is.
  691. These can include selector codes installed by Apple's (system)
  692. software or by software from third parties (your software?).
  693. (NIM Operating System Utilities has been delayed from Winter 1992 to
  694. June 1993, according to Addison-Wesley Holland).
  695.  
  696. I don't have all the documentation or knowledge and I don't want to.
  697. I would like to see this list to become a combined effort by different
  698. persons who have together access to a wide area of information.
  699. This list may contain (educated) guesses and perhaps even false
  700. information, so no guarantee is made about the contents.
  701. You can use this information freely, but when you find information not
  702. included in IM VI or in this list; please mail it me.
  703. If you have additions, corrections, comments, suggestions, news about
  704. available software, etc., please mail me. Please, also mention the
  705. source you used.
  706. For ways to contact me, see the end of this list.
  707.  
  708. This list is originally distributed in the following ways:
  709. USENET newsgroup comp.sys.mac.programmer (c.s.m.p.)
  710. I will post every new version of the list to c.s.m.p., but the last
  711. version will be reposted once a month.
  712.  
  713. FTP-site
  714. sumex-aim.stanford.edu
  715. Every new version (except bug-release) is submitted to the info-mac
  716. archives at sumex-aim.stanford.edu. (/info-mac/tech/gestalt-list-XX.txt)
  717. It is also available on its mirror sites (e.g. in Europe: lth.se).
  718.  
  719. FINGER
  720. You can also read this list by using finger to 'rgaros@bio.vu.nl'.
  721.     Tip: 'finger rgaros@bio.vu.nl | more' or
  722.          'finger rgaros@bio.vu.nl > filename'
  723. My .plan file that you see when you do this, may be more up-to-date and
  724. may include small corrections, or contains a preliminary version of the
  725. next version to be published.
  726.  
  727. MAIL LIST
  728. Every person on this mail list gets automatically an update by email whenever
  729. there are some changes. If you want to join this mail list you need to send
  730. me an email asking to be included. The same applies when you want to be
  731. removed from the list.
  732. This service is only possible to those who have an account on Internet or
  733. any other network reachable from Internet. I can not provide mailing of
  734. printed versions or on disk by normal surface mail.
  735.  
  736.  
  737. CONTENTS
  738.     # Changes
  739.     # Definitions and Format
  740.     # Gestalt Selector Codes & Responses
  741.       =  Apple System Software
  742.       =  Apple Additional Software
  743.       =  Third Parties Software
  744.     # Gestalt Selector Codes, Responses Unknown
  745.       =  Apple System Software
  746.       =  Apple Additional Software
  747.       =  Third Parties Software
  748.     # Abbreviations
  749.     # Format version numbers
  750.       =  4-byte words
  751.       =  BCD
  752.       =  INTEGER
  753.     # AppleShare File & Print Server selector codes
  754.     # Glue code
  755.     # Sources
  756.     # Related Software
  757.     # Acknowledgements
  758.     # Legal Stuff
  759.       =  Notice of Liability
  760.       =  Trademarks
  761.       =  Distribution
  762.     # Moderator
  763.  
  764.  
  765. ####Changes (since v1.1)
  766.     Added selectors
  767.       Apple System  : alis, fxfr, misc, term,
  768.       Apple Add.    : arb 
  769.       Third Parties : CKI3
  770.     Added unknown
  771.       Apple System  : OSType(7), OSType(13)
  772.       Apple Add.    : 
  773.       Third Parties : AP17, GtOp, gV00..gV04, LFnt, PBUf, PBUt, RQDC
  774.     Changed
  775.       Apple System  : atkv, conn, hdwr, mach, ppc , rsrc, tabl
  776.       Apple Add.    : qtim
  777.       Third Parties : YeHa
  778.     Previously unknown
  779.       Apple System  : ctbm, ctbu, sccr, sccw, vmbs
  780.       Apple Add.    : strm
  781.       Third Parties : ApoL (incl. complete description)
  782.  
  783.     Added "Glue Code" chapter about selectors 'glue-ed' by programming
  784.       software, when the Gestalt Manager is not available. (Suggested
  785.       by Marco Piovanelli).
  786.     Marco also went hunting for the Gestalt Selector Table and found
  787.       probably the correct meaning of the 'tabl' selector.
  788.       Meanwhile he also found two unusual selectors, OSType(7) and
  789.       OSType(13) ("Charlie's selectors" !? ;-) ) These are listed at
  790.       the end of unknown Apple System Software selectors.
  791.     Added "Legal Stuff" chapter (US legal system is famous :-) ).
  792.     More entries in 'Related software'-chapter, including the location
  793.       of related New Technical Notes on ftp.apple.com.
  794.     Selectors 'dict' and 'tsmv' were incorrectly listed as known.
  795.     Dave Radcliffe (Mac DTS, Author TN Apple) clarified the two
  796.       contradictions in the previous version.
  797.     Jeremy Roussak (Author Apollo ext) allowed including the chapter
  798.       'Programmers' Information' from the Apollo 1.0 documentation.
  799.     Victor Tan (Author SpeedyFinder7 cp) provided some remarks about
  800.       the selector installed by SP7.
  801.  
  802.     And yes, when there are more 'Third Party'-selectors they will
  803.     get their own, separate list.
  804.  
  805.  
  806. ####Definitions and Format
  807.     Apple System Software
  808.       Selectors installed by normal System Software.
  809.       IM VI: "Apple reserves for its own use all four-character
  810.               sequences consisting solely of lowercase letters and
  811.               nonalphabetic ASCII characters".
  812.     Apple Additional Software
  813.       Selectors installed by additional software by Apple Inc.
  814.       See also quote above.
  815.     Third Parties Software
  816.       Selectors installed by software from parties other than Apple Inc.
  817.       IM VI: "If you have registered a creator string with Apple, you
  818.               are strongly encouraged to use that sequence as your
  819.               selector code".
  820.  
  821.     Format used to display information about selector code:
  822.  
  823.     |   ****'selector code' (Application [available in version])
  824.     |       name (description, documentation) OR description
  825.     |
  826.     |       CONST declaration; {remark} *ref.number to source
  827.     |
  828.     |       contradiction:
  829.     |         source A says "X"
  830.     |         source B says "Y"
  831.  
  832.     If a selector code is installed by Apple software the entry also
  833.     includes if it is in addition to or not listed in IM VI.
  834.     The source reference number may also be used in other places than
  835.     indicated above. It then applies to other parts of then entry.
  836.     Some constant-names may not originate from official publications.
  837.     Any response value described is what was found by others or myself on
  838.     different machine(s) with its configuration.
  839.  
  840.  
  841. ####Gestalt Selector Codes & Responses
  842. ====Apple System Software
  843. ****'alis' (System [7.0])
  844.     gestaltAliasMgrAttr (addition by AppleTalk Remote Access)
  845.  
  846.     gestaltAliasMgrSupportsRemoteAppletalk = 1; {supports Remote Access} *9
  847.     See also remarks with 'qtim' selector.
  848. ****'atkv' (System [since 7.0, AT 56])
  849.     gestaltATalkVersion *4 (not listed)
  850.     Returns AppleTalk version in 4-byte words.
  851.     This is different from 'atlk' !
  852.     With the release of the System 7 Tuner product, AppleTalk will not be
  853.     loaded at startup, if prior to the previous shutdown AppleTalk was
  854.     turned off in the Chooser. Under this circumstance, the 'atkv' selector
  855.     is not available. If the 'atkv' selector is not available under System 7,
  856.     this is an indicator that AppleTalk cannot be turned on without doing so
  857.     in the Chooser and rebooting the system. *4
  858.  
  859.     gestaltATalkVersion = 'atkv'; *3/5
  860. ****'atlk' (System [since 6.0.4])
  861.     gestaltAppleTalkVersion (addition)
  862.     Returns the version of the .MPP driver in INTEGER.
  863.  
  864.     LAPMgrExists := (AppleTalkVersion >= 53); *4
  865. ****'conn' (System, CTB installed [since 7.0])
  866.     gestaltConnMgrAttr (addition)
  867.     Under System 6, this Gestalt selector isn't implemented when the
  868.     Communications Toolbox is installed (Michael Hecht).
  869.  
  870.     additional responses exist but unknown (bit 2 & 3).
  871. ****'ctbm' (System, CTB installed)
  872.     gestaltCTBManagersAttr (not listed)
  873.     Communications Toolbox Managers, bitmask of which managers are present.
  874.  
  875.     gestaltCTBManagersAttr = 'ctbm'; *7
  876. ****'ctbu' (System, CTB installed)
  877.     gestaltCTBUtilsAttr (not listed)
  878.     Communications Toolbox Utilities Attr
  879.  
  880.     gestaltCTBUtilsAttr    = 'ctbu'; *7
  881.     gestaltCTBUtilsPresent = 0;      *7
  882. ****'eajt' (Easy Access cp [since 7.0])
  883.     gestaltEasyAccessJTable (not listed)
  884.     Returns the base address of the Easy Access jump-trap table.
  885.  
  886.     gestaltEasyAccessJTable = 'eajt'; *3
  887. ****'flag' (Network Extension ext [since System 7.0 *4])
  888.     gestaltFlagshipAttr (not listed)
  889.  
  890.     gestaltFlagshipAttr       = 'flag'; *3
  891.     gestaltFlagshipPresent    = 0;      *3
  892.     gestaltFlagshipRegistered = 1;      *3
  893. ****'fpu ' (System [since 6.0.4])
  894.     gestaltFPUType (addition)
  895.  
  896.     gestal68040FPU = 3; *2
  897. ****'fs  ' (System)
  898.     gestaltFSAttr (addition)
  899.  
  900.     gestaltHasFileSystemManager = 2; *2
  901. ****'font' (System [since 7.0])
  902.     gestaltFontMgrAttr (addition)
  903.  
  904.     additional System 7.1 responses exist but unknown.
  905. ****'fxfr' (System [since 7.0])
  906.     gestaltFXfrMgrAttr (addition)
  907.  
  908.     gestaltFXfrMgrErrorString = 1; *7
  909. ****'hdwr' (System [since 6.0.4])
  910.     gestaltHardwareAttr (additions)
  911.  
  912.     gestaltHasRBV          =  2; {RBV}                     *3
  913.     gestaltHasOSS          =  5; {OSS}                     *3
  914.     gestaltHasSCSIDMA      =  6; {53C80 SCSI DMA}          *3
  915.     gestaltHasSWIMIOP      =  8; {SWIM IOP}                *3
  916.     gestaltHasSCCIOP       =  9; {SCC IOP}                 *3
  917.     gestaltHasFitch        = 10; {Fitch memory Controller} *8
  918.     gestaltHasIWM          = 11; {IWM}                     *3
  919.     gestaltHasPWM          = 12; {PWM disk speed buffer}   *8
  920.     gestaltHasRAMSndBuff   = 13; {RAM-based sound buffer}  *8
  921.     gestaltHasVideoDAConv  = 14; {Video D/A Converter}     *8
  922.     gestaltHasPGC          = 15; {PGC (parity control)}    *8
  923.     gestaltHasSoftPowerOff = 19;                           *2
  924.     gestaltHasSonic        = 20; {Sonic}                   *3
  925.     gestaltHasSCSI961      = 21; {Int. 53C96 SCSI}         *1
  926.     gestaltHasSCSI962      = 22; {Ext. 53C96 SCSI}         *1
  927.     gestaltHasDAFBVideo    = 23; {DAFB Video}              *3
  928.     See for more information the TN "M.OV.GestaltSysenvirons".
  929. ****'kbd ' (System [since 6.0.4])
  930.     gestaltKeyboardType (additions)
  931.  
  932.     gestaltPwrBookADBKbd    = 12; {PowerBook ADB Keyboard}     *1
  933.     gestaltPwrBookISOADBKbd = 13; {PowerBook ISO ADB Keyboard} *1
  934. ****'mach' (System [since 6.0.4])
  935.     gestaltMachineType (additions)
  936.  
  937.     gestaltQuadra900    = 20; {Macintosh Quadra 900}     *1
  938.     gestaltPowerBook170 = 21; {Macintosh PowerBook 170}  *1
  939.     gestaltQuadra700    = 22; {Macintosh Quadra 700}     *1
  940.     gestaltClassicII    = 23; {Macintosh Classic II}     *1
  941.     gestaltPowerBook100 = 24; {Macintosh PowerBook 100}  *1
  942.     gestaltPowerBook140 = 25; {Macintosh PowerBook 140}  *1
  943.     gestaltQuadra950    = 26; {Macintosh Quadra 950}     *1
  944.     gestaltPowerBook210 = 29; {Macintosh PowerBook 210}
  945.     gestaltPowerBook230 = 32; {Macintosh PowerBook 230}
  946.     gestaltPowerBook180 = 33; {Macintosh PowerBook 180}
  947.     gestaltPowerBook160 = 34; {Macintosh PowerBook 160}
  948.     gestaltMacLCII      = 37; {Macintosh LC II}
  949.     gestaltMacIIvi      = 44; {Macintosh IIvi}
  950.     gestaltPerforma600  = 45; {Macintosh Performa 600}
  951.     gestaltMacIIvx      = 48; {Macintosh IIvx}
  952.     gestaltPowerBook145 = 54; {Macintosh PowerBook 145}
  953.  
  954.     Exceptions with systems prior to System 7.1:
  955.     gestaltMacLCII      = 19; {Macintosh LC & LC II}
  956.     gestaltPowerBook145 = 25; {Macintosh PowerBook 140 & 145}
  957. ****'misc' (System [since 6.0.5])
  958.     gestaltMiscAttr (addition)
  959.  
  960.     gestaltBootGlobals = 1; {Boot Globals} *8
  961. ****'mmu ' (System [since 6.0.4])
  962.     gestaltMMUType (addition)
  963.  
  964.     gestalt68040MMU = 4; {68040 built-in} *2
  965. ****'ppc ' (System [since 7.0])
  966.     gestaltPPCToolboxAttr (addition)
  967.     The first thing that is confusing is that, unlike other selectors
  968.     returning attributes, the responses are not bit values, but bit masks.
  969.     This means you simply AND the value with the response to test the bit.
  970.     The second thing that is confusing is how to interpret
  971.         gestaltPPCToolboxPresent = 0x0000.
  972.     What this means is that if the PPC toolbox is present, but has not
  973.     been initialized (by calling PPCInit), then gestaltPPCToolboxAttr
  974.     returns 0x0000. In reality, PPCInit gets called by the Process
  975.     Manager before any applications get launched, so no applications
  976.     will actually see this response. (Dave Radcliffe)
  977.  
  978.     gestaltPPCToolboxAttr      = 'ppc ';
  979.     gestaltPPCToolboxPresent   = 0x0000, {Requires PPCInit to be called}
  980.     gestaltPPCSupportsIncoming = 0x0001; {Deny incoming net requests}
  981.     gestaltPPCSupportsOutGoing = 0x0002; {Deny outgoing net requests}
  982.     gestaltPPCSupportsRealTime = 0x1000; {Supports real-time delivery}
  983. ****'proc' (System [since 6.0.4])
  984.     gestaltProcessorType (addition)
  985.  
  986.     gestalt68040 = 5; *2
  987. ****'qdrw' (System [since 7.0])
  988.     gestaltQuickDrawFeaturesAttr (not listed)
  989.     There is a bug in the 'qdrw' selector that causes it to report
  990.     that Color QuickDraw is always present, even on machines that
  991.     don't support it.
  992.     Apple has acknowledged this bug on AppleLink. (Chris Wysocki)
  993.     Use SysEnvirons instead or try this:
  994.       gHasColorQuickDraw := (Gestalt(gestaltQuickDrawVersion,
  995.         qdVersion) = noErr) & (qdVersion >= gestaltQuickDraw8Bit);
  996.  
  997.     gestaltQuickDrawFeaturesAttr = 'qdrw'; *2
  998.     gestaltHasColor              = 0;      *2
  999.     gestaltHasDeepGWorlds        = 1;      *2
  1000.     gestaltHasDirectPixMaps      = 2;      *2
  1001.     gestaltHasGrayishTextOr      = 3;      *2]
  1002. ****'rsrc' (System [should work since 7.0?])
  1003.     gestaltResourceMgrAttr (addition)
  1004.     Under System 7, bit 0 that tells if you have partial resource
  1005.     support doesn't work right. This selector is undefined under
  1006.     System 7.0 and 7.0.1 even though the partial resource calls are
  1007.     available. (Michael Hecht, Quinn)
  1008.  
  1009.     additional response exist but unknown (bit 1).
  1010. ****'sccr' (System [6.0.4, discontinued])
  1011.     gestaltSCCReadPortsAddr (not listed)
  1012.     Returns the address of SCC read ports.
  1013.  
  1014.     gestaltSCCReadPortsAddr = 'sccr';
  1015. ****'sccw' (System [6.0.4, discontinued])
  1016.     gestaltSCCWritePortsAddr (not listed)
  1017.     Returns the address of SCC write ports.
  1018.  
  1019.     gestaltSCCWritePortsAddr = 'sccw';
  1020. ****'sysv' (System [since 6.0.4])
  1021.     gestaltSystemVersion (listed in IM VI; question)
  1022.     Returns the version number of currently active System file in BCD.
  1023.     Is it correct system 6.0.8 returns 0x0607? Can you determine if it
  1024.     is actually 6.0.8 in another way?
  1025. ****'tabl' (System [since 6.0.4])
  1026.     gestaltSelectorTable (not listed)
  1027.     Returns a handle to the Gestalt selector table itself.
  1028.     The Gestalt selector table is kept in a resizable block in the system
  1029.     heap. The last item in the table is a dummy entry (INVALID), marked by
  1030.     a selector OSType(MaxLongInt). (Marco Piovanelli, he has also some
  1031.     snippet Pascal code to list all selectors)
  1032.  
  1033.     gestaltSelectorTable = 'tabl';
  1034. ****'term' (System [7.1?])
  1035.     gestaltTermMgrAttr (addition)
  1036.  
  1037.     gestaltTermMgrErrorString = 1; *7
  1038. ****'via1' (System [6.0.4, discontinued])
  1039.     gestaltVIA1Addr (not listed)
  1040.     Returns the address of VIA 1.
  1041.  
  1042.     gestaltVIA1Addr = 'via1';
  1043. ****'via2' (System [6.0.4, discontinued])
  1044.     gestaltVIA2Addr (not listed)
  1045.     Returns the address of VIA 2.
  1046.  
  1047.     gestaltVIA2Addr = 'via1';
  1048. ****'vmbs' (System, VM on [since 7.0])
  1049.     gestaltVMBackingStoreRef (not listed)
  1050.     Returns the ioRefNum of the VM storage file.
  1051.  
  1052.     gestaltVMBackingStoreRef = 'vmbs';
  1053. ****'wma.' (System [since 7.0])
  1054.     gestaltResponderAttr (Workstation Management Agent aka Responder,
  1055.                           not listed)
  1056.  
  1057.     gestaltResponderAttr    = 'wma.';
  1058.     gestaltResponderPresent = 0;
  1059. ****'xttt' (System [since 6.0.8])
  1060.     gestaltExtToolboxTable (not listed)
  1061.     Returns the base address of the Extended Toolbox trap table.
  1062.  
  1063.     gestaltExtToolboxTable = 'xttt';
  1064.  
  1065.  
  1066. ====Apple Additional Software
  1067. ****'admn' (AppleShare Admin appl [since 3.0])
  1068.     gestaltASAdminAttr
  1069.  
  1070.     gestaltASAdminAttr    = 'admn';
  1071.     gestaltASAdminPresent = 0;
  1072. ****'arb ' (AppleTalk Remote Access [1.0])
  1073.     gestaltArbitorAttr (Serial Port Arbitration) *9
  1074.  
  1075.     gestaltArbitorAttr = 'arb ';
  1076.     gestaltSerialArbitrationExists = 0; {Serial Port Arbitration installed}
  1077. ****'asps' (AppleShare Print Server appl [since 3.0])
  1078.     gestaltASPrintServerAttr
  1079.  
  1080.     gestaltASPrintServerAttr    = 'asps';
  1081.     gestaltASPrintServerPresent = 0;
  1082. ****'aucd' (Audio CD Access ext [since 4.0])
  1083.     gestaltAudioCDAccessVersion (CD-ROM Software 4.0)
  1084.     Returns Audio CD Access version in BCD.
  1085.     Version 4.0.1 of the CD-ROM Software will still return 0x0400.
  1086.  
  1087.     gestaltAudioCDAccessVersion = 'aucd';
  1088. ****'font' (TrueType INIT for System 6.x)
  1089.     This selector is also installed by the TT INIT.
  1090.     See for details IM VI.
  1091. ****'hgfd' (AppleShare File Server appl [since 3.0])
  1092.     gestaltASFileServerAttr
  1093.  
  1094.     gestaltASFileServerAttr    = 'hgfd';
  1095.     gestaltASFileServerPresent = 0;
  1096. ****'hscd' (High Sierra File Access ext [since 4.0])
  1097.     gestaltHighSierraFAVersion (CD-ROM Software 4.0)
  1098.     Returns High Sierra File Access version in BCD.
  1099.     Version 4.0.1 of the CD-ROM Software will still return 0x0400.
  1100.  
  1101.     gestaltHighSierraFAVersion = 'hscd';
  1102. ****'mtcp' (MacTCP cp [since 1.1])
  1103.     gestaltMacTCPAttr
  1104.     0x0000 is returned if MacTCP is present but unopened, *5
  1105.     0x0001 is returned for MacTCP when it is opened.      *5
  1106.  
  1107.     gestaltMacTCPAttr   = 'mtcp';
  1108.     gestaltMacTCPOpened = 0; *5
  1109.     I have seen this selector returning 0x0002 on a PB140 with System 7.1,
  1110.     unknown MacTCP version.
  1111. ****'qtim' (QuickTime ext [since 1.0])
  1112.     gestaltQuickTimeVersion
  1113.     Returns QuickTime version in 4-byte words.
  1114.     If you install QuickTime under System 6, a major portion of the Alias
  1115.     Manager and FSSpec support is also added. But, QT doesn't implement
  1116.     the Gestalt selectors because the implementation is not complete. You
  1117.     must check for either Alias Mgr or QuickTime. (Michael Hecht)
  1118.  
  1119.     gestaltQuickTimeVersion = 'qtim';
  1120. ****'strm' (AppleTalk Remote Access [1.0])
  1121.     gestaltRemoteAccessAttr *9
  1122.  
  1123.     gestaltRemoteAccessAttr   = 'strm';
  1124.     gestaltRemoteAccessExists = 0; {RA Connection Interface is available)
  1125. ****'ufox' (Foreign File Access ext [since 4.0])
  1126.     gestaltForeignFAVersion (CD-ROM Software 4.0)
  1127.     Returns Foreign File Access version in BCD.
  1128.     Version 4.0.1 of the CD-ROM Software will still return 0x0400.
  1129.  
  1130.     gestaltForeignFAVersion = 'ufox';
  1131.  
  1132. ====Third Parties Software
  1133. ****'ApoL' (Apollo ext [since 1.0])
  1134.     gestaltApolloTable
  1135.     Returns a handle to an instance of the following structure (described
  1136.     in C):
  1137.  
  1138.     struct
  1139.      {  long version;          // same as first 4 bytes of 'vers' resource
  1140.         short attr;            // attribute bits
  1141.         Boolean (*Control)(Boolean)   // control function
  1142.       };
  1143.  
  1144.     See for more information the Programmers' Information chapter in the
  1145.     Apollo 1.0 documentation. (Jeremy Roussak)
  1146.  
  1147.     gestaltApolloTable = 'ApoL';
  1148. ****'CKI3' (AETracker cp [since 3.0])
  1149.     gestaltAETrackerAddr
  1150.     This selector returns a pointer to the external interface routine for
  1151.     AETracker, details of which are in the AETracker interface guide.
  1152.     (C.K. Haun)
  1153.  
  1154.     gestaltAETrackerAddr = 'CKI3';
  1155. ****'SLip' (StuffIt SpaceSaver ext)
  1156.     gestaltSItSpaceSaverAddr
  1157.     Returns the address of the SpaceSaver "command module" which allows
  1158.     developers to access all the functions of SS. (Leonard Rosenthol)
  1159.  
  1160.     gestaltSItSpaceSaverAddr = 'SLip';
  1161.  
  1162.  
  1163. ####Gestalt Selector Codes, Responses Unknown
  1164. ====Apple System Software
  1165. ****'BSDa' (CloseView cp)
  1166.     (developed by Berkeley Systems, Inc.)
  1167. ****'bugz' (System (Tuna Helper INIT rsrc) [since 7.0]/Tune-up ext)
  1168.     IIx (701/111): $02f7f33f, PB140 (71): $1ffffaff
  1169. ****'dict' (System [since 7.1])
  1170.     gestaltDictionaryMgrAttr/Version? (Dictionary Manager, not listed)
  1171.  
  1172.     gestaltDictionaryMgr???     = 'dict';
  1173.     PB140 (71): $00000001
  1174. ****'icon' (System? [?])
  1175.     Icon Utilities Attr?
  1176. ****'nubs' (System [6.0.4, 6.0.5, 6.0.7, discontinued])
  1177.     gestaltNuBusCount?
  1178.     Returns count of NuBus slots?
  1179.     Plus: $00000000, IIx: $00000006
  1180. ****'rbv ' (System [6.0.4, discontinued])
  1181.     Plus: $00000000, IIx: -
  1182.     (Installed but unknown response on MacIIx)
  1183. ****'slot' (System [6.0.4, 6.0.5, discontinued])
  1184.     Plus: $00000000, IIx: $00000003
  1185. ****'slt1' (System [6.0.4, 6.0.5, discontinued])
  1186.     Returns first slot# in hexadecimal?
  1187.     Plus: -, IIx: $00000009
  1188.     (Installed but unknown response on MacPlus)
  1189. ****'tsmv' (System [since 7.1])
  1190.     gestaltTextServicesMgrVersion? (not listed)
  1191.  
  1192.     gestaltTextServicesMgrVersion = 'tsmv';
  1193.     new System 7.1 response exists but unknown
  1194. ****'vmcl' (System, VM on [since 7.0])
  1195. ****OSType(7) (System [since 6.0.4])
  1196.     Returns LongInt('carl') and a result code of noErr.
  1197. ****OSType(13) (System [since 6.0.4])
  1198.     Returns LongInt('bbmc') and a result code of noErr.
  1199.  
  1200. ====Apple Additional Software
  1201. ****'cpnt' (QuickTime ext [since 1.0])
  1202.     gestaltComponentMgrAttr/Version? (Component Manager)
  1203.  
  1204.     gestaltComponentMgr???     = 'cpnt';
  1205.     gestaltComponentMgrPresent = 0; (guess)
  1206. ****'icmp' (QuickTime ext [since 1.0])
  1207.     gestaltCompressionMgrAttr (ImageCompression Manager) *6
  1208.  
  1209.     gestaltCompressionMgrAttr = 'icmp'; *6
  1210. ****'kpcd' (Apple Photo Access ext [since 1.0])
  1211.     gestaltApplePhotoAccess??? (CD-ROM Software 4.0)
  1212.     Response unknown ($fffffff7).
  1213.  
  1214.     gestaltApplePhotoAccess??? = 'kpcd';
  1215. ****'slnk' (AppleTalk Remote Access MNPlink? [1.0])
  1216.  
  1217. ====Third Parties Software
  1218.     Especially the Third Party selectors may change with every new release
  1219.     and are therefore only listed in the 'known selectors' chapter when
  1220.     the author has described the structure in the documentation or by
  1221.     mail to me.
  1222. ****'AP17' (?)
  1223. ****'AzNe' (NameView cp)
  1224. ****'ESOC' (Serial of Champions ext)
  1225. ****'GtOp' (?)
  1226. ****'gV00', 'gV01', 'gV02', 'gV03', 'gV04' (PowerPort cp???)
  1227. ****'He20' (Helium cp)
  1228. ****'Intj' (Interjection ext)
  1229. ****'LFnt' (Dialog View cp, formerly List Font cp)
  1230. ****'MV10' (TearOFF cp)
  1231. ****'NMBT' (Attention cp [since 0.6])
  1232. ****'PBUf' (?)
  1233. ****'PBUt' (?)
  1234. ****'RQDC' (DropCheck cp)
  1235. ****'YeHa' (SpeedyFinder7 cp)
  1236.     The structure to which the _Gestalt selector refers changes almost
  1237.     invariably from version to version of SF7. Should someone work out
  1238.     parts of the structure of the selector keep in mind that it will
  1239.     almost certainly change in the next minor release and definitley with
  1240.     the next major release. (Victor Tan)
  1241.  
  1242.  
  1243. ####Abbreviations
  1244.     ADB    - Apple Desktop Bus
  1245.     AS     - AppleShare
  1246.     ASC    - Apple Sound Chip
  1247.     CPU    - Central Processing Unit
  1248.     DAFB   - ???
  1249.     DMA    - Direct Memory Access
  1250.     DN     - Developer Note
  1251.     FPU    - Floating Point Unit
  1252.     IM     - Inside Macintosh (old volumes I-VI)
  1253.     IOP    - Input/Output Processor
  1254.     IWM    - Integrated Woz Machine
  1255.     MMU    - Memory Management Unit
  1256.     NIM    - New Inside Macintosh
  1257.     OSS    - ???
  1258.     PGC    - ???
  1259.     PPC    - Process-to-Process Communication
  1260.     PWM    - ???
  1261.     RBV    - RAM-Based Video
  1262.     SCC    - Serial Communications Controller
  1263.     SCSI   - Small Computer System Interface
  1264.     SIMM   - Single In-line Memory Module
  1265.     Sonic  - ???
  1266.     SWIM   - Super Integrated Woz Machine?
  1267.     TN     - Technical Note
  1268.     VIA    - Versatile Interface Adapter
  1269.     VM     - Virtual Memory
  1270.  
  1271.     appl   - application
  1272.     cp     - control panel
  1273.     ext    - extension
  1274.     FA     - File Access
  1275.     RA     - Remote Access
  1276.  
  1277.  
  1278. ####Format version numbers
  1279. ====4-byte words
  1280.     The format of the LONGINT result is as follows:
  1281.     (based on posting by Ivan M Cavero Belaunde)
  1282.  
  1283.         MMmbSSss    (e.g. 01524050)
  1284.  
  1285.         Where:
  1286.             MM is major revision release in BCD           1
  1287.             m  is minor revision release in BCD           5
  1288.             b  is bug fix release in BCD                  2
  1289.             SS is development stage                       b
  1290.                (dev=10,alpha=20,beta=40,release=80)
  1291.             ss is dev. stage # in BCD                    50
  1292.                                                     ------- +
  1293.                                                    1.5.2b50   :-)
  1294.  
  1295.     The 'atkv' selector returns the major revision release in hexadecimal.
  1296. ====BCD (Binary Coded Decimal)
  1297.     0x0400 means 4.0.0 (MMmb, see above)
  1298. ====INTEGER
  1299.     The decimal representation of the returned value is the version.
  1300.  
  1301.  
  1302. ####AppleShare File & Print Server selector codes
  1303.     The selectors are defined when the application has run.
  1304.     If it is still running (or wasn't properly quit) the response
  1305.     is one. When the application has properly quit the response
  1306.     is zero.
  1307.       'admn' AppleShare Admin
  1308.       'asps' AppleShare Print Server
  1309.       'hgfd' AppleShare File Server
  1310.  
  1311.  
  1312. ####Glue code
  1313.     The following programming software includes glue-code to return some
  1314.     responses even if the Gestalt Manager is not available. Every entry
  1315.     includes the selectors of which the Glue-code can return a response.
  1316.  
  1317. ****Symantec THINK Pascal [at least since 4.0.1]:
  1318.     atlk, fpu , kbd , kbd , lram, mach, mmu , qd  , ram , sysv, vers
  1319.  
  1320.  
  1321. ####Sources
  1322.     *1 Apple Inc.; TN M.OV.GestaltSysenvirons, May 1987, rev. Sep. 1992
  1323.     *2 Symantec Corp.; THINK Pascal 4.0.1
  1324.     *3 Carl C.Hewitt; Gestalt DA 1990
  1325.     *4 Apple Inc.; TN M.NW.AppleTalk2, Feb. 1992, rev. Sep. 1992
  1326.     *5 Apple Inc.; MacTCP 1.1 Programmer's Guide.
  1327.     *6 Apple Inc.; QuickTime ImageCompression source files (with QT 1.0)
  1328.     *7 Symantec Corp.; Think C GestaltGlue source files
  1329.     *8 Eric Simenel, Apple Computer France; Gestalt dcmd 1.0
  1330.     *9 Apple Inc.; AppleTalk Remote Access API External Reference
  1331.                    Specification
  1332.  
  1333.  
  1334. ####Related Software
  1335. ****AEgestalt
  1336.     Uses Apple Events to get Gestalt response from remote machine,
  1337.     includes C-source. (Requires color?? Doesn't want to run on MacPlus)
  1338.       FTP: bric-a-brac.apple.com
  1339.              /dts/mac/sc/snippets/platforms.tools/aegestalt-1-0.hqx
  1340. ****Gestalt DCMD
  1341.     This dcmd (debugger command for MacsBug) allows you to "use"
  1342.     Gestalt when you're in MacsBug.
  1343.       FTP: bric-a-brac.apple.com
  1344.              /dts/mac/sc/snippets/platforms.tools/gestalt-dcmd.hqx
  1345. ****DisplayGestalt
  1346.     Small application displays configuration using Gestalt Mgr,
  1347.     includes C-source.
  1348.       FTP: mac.archive.umich.edu
  1349.              /development/libraries/displaygestalt.cpt.hqx
  1350. ****Gestalt!
  1351.     Displays responses from know installed selectors.
  1352.       FTP: ftp.lu.se
  1353.              /pub/mac/util/Gestalt!_X.X.X.cpt.hqx
  1354.              /pub/mac/util/Gestalt!_X.X.X.cpt.hqx.txt
  1355. ****GestaltDA
  1356.     Displays responses from installed selectors.
  1357. ****GestaltExt
  1358.     External for 4TH Dimension Relational Database application from
  1359.     ACI/ACIUS.
  1360.       FTP: ftp.scri.fsu.edu
  1361.              /pub/4d/4d-GestaltExt.external.hqx
  1362. ****GestaltGlue
  1363.     Glue code in C.
  1364.       FTP: ics.uci.edu
  1365.              /mac/think-c/symantec/pre-5.0stuff/gestalt.hqx
  1366. ****Technical Notes 'M.OV.GestaltSysenvirons' and 'M.NW.AppleTalk2'
  1367.     M.OV.GestaltSysenvirons discusses Gestalt and SysEnvirons
  1368.     M.NW.AppleTalk2 discusses AppleTalk
  1369.       FTP: bric-a-brac.apple.com
  1370.              /dts/mac/tn/overview/gestalt-and-system-environs.hqx
  1371.              /dts/mac/tn/networking/appletalk2.hqx
  1372. ****Test Gestalt
  1373.     Examples to test for QuickDraw version and Virtual Memory status,
  1374.     includes C-source.
  1375.       FTP: bric-a-brac.apple.com
  1376.              /dts/mac/sc/snippets/toolbox/testgestalt.hqx
  1377.  
  1378.  
  1379. ####Acknowledgements
  1380.     I want to thank the following persons for their contribution
  1381.     to this list:
  1382.  
  1383.     C.K. Haun (Author AETracker cp)                       <haun@apple.com>
  1384.     Chris Wysocki                                     <wysocki@netcom.com>
  1385.     Dave Radcliffe (Author TN GestaltSysenvirons)     <radcliff@apple.com>
  1386.     Ivan M Cavero Belaunde                         <ivanski@world.std.com>
  1387.     Jeremy Roussak (Author Apollo ext)             <jeremyr@dcs.qmw.ac.uk>
  1388.     Jon Watte                                        <d88-jwa@nada.kth.se>
  1389.     Lawrence D'Oliveiro                                <ldo@waikato.ac.nz>
  1390.     Leonard Rosenthol                                <leonardr@netcom.com>
  1391.     Marco Piovanelli                         <piovanel@ghost.dsi.unimi.it>
  1392.     Mark B. Johnson                                   <mjohnson@Apple.com>
  1393.     Michael Hecht                              <Michael_Hecht@mac.sas.com>
  1394.     Pete Resnick                                 <resnick@cogsci.uiuc.edu>
  1395.     Quinn                                            <quinn@cs.uwa.edu.au>
  1396.     Robert Hess                             <robert_hess@macweek.ziff.com>
  1397.     Roland Mansson (Author Gestalt! appl)       <roland.mansson@ldc.lu.se>
  1398.     Victor Tan (Author SpeedyFinder7 cp)      <victort@extro.ucc.su.oz.au>
  1399.  
  1400.     and the Computer Department at the Biology Faculty of the
  1401.     Free University in Amsterdam (The Netherlands) for their help and
  1402.     support.
  1403.  
  1404.     These persons provided information used in this list. They did this
  1405.     on personal title, NOT on behalf of their employer.
  1406.     I assume information you mail to me about Gestalt selectors may be
  1407.     used in this list. Information made available to the general public
  1408.     (e.g. a posting to a USENET newsgroup) is also included and the
  1409.     persons name added to this chapter (and to the mail list).
  1410.     I will mail you back to thank you and include the parts from the
  1411.     list which, according the information you provided, were changed
  1412.     to let you check them.
  1413.     BTW Persons are only listed with any software they wrote when
  1414.     these are mentioned somewhere in this list.
  1415.  
  1416.  
  1417. ####Legal Stuff
  1418. ====Notice of Liability
  1419.     The information in this list is distributed on a "AS IS" basis, without
  1420.     warranty. While every precaution has been taken in the preparation of
  1421.     this list, neither the moderator nor any contributor shall have any
  1422.     liability to any person or entity with respect to any liability, loss,
  1423.     or damage caused or alleged to be caused directly or indirectly by the
  1424.     information contained in this list or by the computer software and
  1425.     hardware products described herein.
  1426. ====Trademarks
  1427.     Throughout this list trademarked names are used. Rather than put a
  1428.     trademark symbol in every occurrence of a trademarked name, I state I am
  1429.     using the names only in an editorial fashion and to the benefit of the
  1430.     trademark owner with no intention of infringement of the trademark.
  1431. ====Distribution
  1432.     The information in this list may be used freely for NON-COMMERCIAL
  1433.     purposes only. If you DO USE the information in this list for
  1434.     COMMERCIAL purposes, you may consider sending the moderator a donation.
  1435.     If you (start to) redistribute this list outside Internet (especially
  1436.     printed, on disk or CD-ROM) you are kindly asked to notify the moderator.
  1437.     You are not allowed to distribute modified versions of this list,
  1438.     including, but not limited to, deleting, adding or moving text or
  1439.     adding non-text parts. Distribution in any electronical format except
  1440.     a normal text file is not allowed without permission.
  1441.     You are not allowed to redistribute it with any other name than
  1442.     'gestalt-list-XX.txt' (where XX is the version number) unless because
  1443.     of technical reasons.
  1444.  
  1445.  
  1446. ####Moderator
  1447.     Rene G.A. Ros (student Computer Science)
  1448.     D.C. van Krimpenstraat 3
  1449.     1067 SG  Amsterdam
  1450.     The Netherlands, Europe
  1451.     Bank      : Postbank 4762669
  1452.  
  1453.     Phone#    : +31 20 611 92 74 / +31 20 611 87 00
  1454.     Fax#      : +31 20 611 60 06
  1455.     Internet  : rgaros@bio.vu.nl
  1456.                 rgaros@nikhefk.nikhef.nl
  1457.                 rener@htsa.aha.nl (you can send a carbon copy of urgent
  1458.                                    messages to this address)
  1459.     CompuServe: 100112,1363 (not preferred)
  1460.                 >INTERNET: rgaros@bio.vu.nl
  1461.  
  1462.  
  1463.  
  1464. ---------------------------
  1465.  
  1466. End of C.S.M.P. Digest
  1467. **********************
  1468.